<%@ page language="java" contentType="text/html;charset=UTF-8"%>
<%@ include file="/commons/taglibs.jsp"%>
<%@ include file="/commons/messages.jsp"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>修改业主资料</title>
<script language="JavaScript" type="text/javascript" src="${ctx}/scripts/public.js"></script>
<script language="JavaScript" type="text/javascript" src="${ctx}/scripts/show.js"></script>
<script language="JavaScript" type="text/javascript" src="${ctx}/scripts/global.js"></script>

<%@ include file="/commons/dateTime.jsp" %>
<%@ include file="/commons/validation.jsp" %>
<script language="JavaScript" type="text/javascript" src="${ctx}/scripts/div/common.js"></script>
<script language="JavaScript" type="text/javascript" src="${ctx}/scripts/common.js"></script>
<script language="JavaScript" type="text/javascript" src="${ctx}/pages/com/ce/pms/customer/tenement.js"></script>

<link href="${ctx}/styles/grid.css" rel="stylesheet" type="text/css">
<link href="${ctx}/styles/listTable.css" rel="stylesheet" type="text/css">
<link href="${ctx}/styles/show.css" rel="stylesheet" type="text/css" />
<link href="${ctx}/styles/aux_window.css" rel="stylesheet" type="text/css">

<script type="text/javascript">
var windowObj = null;
var individual = null;
var interestObj = null;

	function submitForm(){
		var isPass=$('ownerBaseIndividual').fireEvent("onSubmit");
		if(!isPass){ return;}
		var str = $("ownerBaseIndividual").serialize();
		var action = document.forms.ownerBaseIndividual.action;
		var myAjax = new Ajax.Request(action,
                   {method: 'post', parameters: str, onComplete: closeFrm}
                   );
	}

	function closeFrm(){
		findFrame("ownerList").reLoadIframe();
		windowClose();
	}

	function init(){
		windowObj = new WindowObj('btn1_22','btn1_32');
		individual = new Individual(windowObj,'ownerBaseIndividual');
		individual.init();
		interestObj = new Interest('selectedInterest','unSelectInterest');
	}
</script>
</head>

<body onload="init();">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<c:if test="${editFlag ne 'editFlag'}">
  <tr>
    <td class="window_head_outBg"><table border="0" cellpadding="0" cellspacing="0">
      <tr>
        <td><img src="${ctx}/images/ico_Advance.gif" width="16" height="16" align="absmiddle"> <span class="window_head_intext">修改业主资料</span></td>
        </tr>
    </table></td>
  </tr>
  <tr>
    <td class="aux_header_line_1"></td>
  </tr>
  <tr>
    <td class="aux_header_line_2"></td>
  </tr>
  </c:if>
  <tr>
    <td valign="middle" class="content"><table width="100%" border="0" cellpadding="0" cellspacing="0" class="container_in_show">
      <tr>
        <td valign="top"><div id="tab_Search"  style="height:428px;overflow:auto;">
                <table width="100%" border="0" align="center" cellpadding="5" cellspacing="0">

                      <tr>
                        <td>
						<form id="ownerBaseIndividual" action="${ctx}/customer_ownerAction.do?method=editIndividualOwnerCache" method="post" class="required-validate">
							<input type="hidden" id="oldParticipantId" name="oldParticipantId" value="${individualOwnerBase.participantId}">
							<input type="hidden" id="participantId" name="participantId" value="${individualOwnerBase.participantId}">

							<input type="hidden" id="index" name="index" value="${individualOwnerBase.index}">
							<input type="hidden" id="optionType" name="optionType" value="isAddEdit">


							<input type="hidden" name="certificateTypeName" id="certificateTypeName" value="${individualOwnerBase.certificateTypeName}">
							<input type="hidden" name="interest" value="${individualOwnerBase.interest}">
                            <table width="100%" border="0" cellpadding="0" cellspacing="1" class="aux_intable_color" id="table01" style="display:show">
                                    <tr>
                                      <td colspan="4" class="aux_titletable">基本资料</td>
                                    </tr>
                                    <tr>
                                      <td class="aux_intable_td1">姓名：</td>
                                      <td class="aux_intable_require"><input name="participantName" type="text" class="inputtext required validate-char" size="16" maxlength="80" value="${individualOwnerBase.participantName}">                                      </td>
                                      <td class="aux_intable_td1">证件类型：</td>
                                      <td class="aux_intable_require">
                                      <pms:unitedSelect name="certificateType" id="certificateType"
                                      					dataList="${certificateTypeList}"
                                      					optionLabel="idTypeName"
                                      					optionValue="idTypeId"
                                      					className="select-one-required"
                                      					selectText="请选择..."
                                      					value="${individualOwnerBase.certificateType}"
                                      					onChange="individual.setInfoByCertificate();">
                                      </pms:unitedSelect>


                                      </td>
                                    </tr>
                                    <tr>
                                      <td class="aux_intable_td1">称呼：</td>
                                      <td class="aux_intable_td2">
                                      		<input name="appellative"
                                      			   maxlength="20"
                                      			   type="text"
                                      			   class="inputtext validate-char"
                                      			   size="16"
                                      			   value="${individualOwnerBase.appellative}">
                                      </td>
                                      <td class="aux_intable_td1">证件号码：</td>
                                      <td class="aux_intable_require">
                                      		<input name="certificateNo"
                                      				maxlength="36"
                                      				type="text"
                                      				class="inputtext required"
                                      				value="${individualOwnerBase.certificateNo}"
                                      				onblur="individual.setInfoByCertificate();">                                      </td>
                                    </tr>
                                    <tr>
                                      <td class="aux_intable_td1">性别：</td>
                                      <td class="aux_intable_require">
                                      <mypms:Radio id="ownerId" name="sex" code="CS_INDIVIDUAL_SEX" className="validate-one-required" selectValue="${individualOwnerBase.sex}"></mypms:Radio>
                                      <td class="aux_intable_td1">联系电话：</td>
                                      <td class="aux_intable_td2"><table border="0" cellspacing="0" cellpadding="0">
                                          <tr>
                                            <td><input name="telephone" maxlength="80" type="text" class="inputtext validate-char" size="16" value="${individualOwnerBase.telephone}"></td>
                                            <td width="4">&nbsp;</td>
                                          </tr>
                                      </table></td>
                                    </tr>
                                    <tr>
                                      <td colspan="4" class="aux_titletable">紧急联系信息</td>
                                    </tr>
                                    <tr>
                                      <td class="aux_intable_td1">紧急联系人：</td>
                                      <td class="aux_intable_td2"><input name="emergencyMan" type="text" maxlength="30" class="inputtext validate-char" size="16" value="${individualOwnerBase.emergencyMan}"></td>
                                      <td class="aux_intable_td1">紧急联系电话：</td>
                                      <td class="aux_intable_td2"><input name="emergencyPhone" type="text" class="inputtext validate-char" size="16" value="${individualOwnerBase.emergencyPhone}">  </td>
                                    </tr>
                                    <tr>
                                      <td colspan="4" class="aux_titletable">其他资料</td>
                                    </tr>
                                    <tr>
                                      <td class="aux_intable_td1">出生日期：</td>
                                      <td class="aux_intable_td2"><table border="0" cellspacing="0" cellpadding="0">
                                          <tr>
                                            <td>
                                            	<input id="birthDate"
                                            		   name="birthDate"
                                            		   type="text"
                                            		   class="inputtext validate-date-yyyy-mm-dd validate-ajax"
                                            		   validateUrl="${ctx}/common_sysrefcodeAction.do?method=compareCurrentDate&dateFormat=yyyy-MM-dd&compareType=smallEqualsCurrentDate"
                                            		   value="<fmt:formatDate value="${individualOwnerBase.birthDate}" pattern="yyyy-MM-dd"/>"
                                            		   size="16"></td>
                                            <td width="4">&nbsp;</td>
                                            <td><img id="imgBirthDate" src="${ctx}/images/ico_clock.gif" width="20" height="20"></td>
                                          </tr>
                                      </table></td>
                                      <td class="aux_intable_td1">电子邮件：</td>
                                      <td class="aux_intable_td2"><table border="0" cellspacing="0" cellpadding="0">
                                          <tr>
                                            <td><input name="email" type="text" class="inputtext validate-email" maxlength="50" value="${individualOwnerBase.email}" size="16"></td>
                                            <td width="4">&nbsp;</td>
                                            <td><img src="${ctx}/images/ico-aux_household_email.gif" width="16" height="16"></td>
                                          </tr>
                                      </table></td>
                                    </tr>
                                    <tr>
                                      <td class="aux_intable_td1">籍贯：</td>
                                      <td class="aux_intable_td2"><input name="homeplace" type="text" maxlength="200" class="inputtext validate-char" value="${individualOwnerBase.homeplace}" size="16"></td>
                                      <td class="aux_intable_td1">车辆情况：</td>
                                      <td class="aux_intable_td2"><table border="0" cellspacing="0" cellpadding="0">
                                          <tr>
                                            <td><input name="registerCar" type="text" class="inputtext validate-char" value="${individualOwnerBase.registerCar}" maxlength="200" size="16"></td>
                                            <td width="4">&nbsp;</td>
                                            <td>&nbsp;</td>
                                          </tr>
                                      </table></td>
                                    </tr>
                                    <tr>
                                      <td class="aux_intable_td1">户口所在地：</td>
                                      <td class="aux_intable_td2"><input name="registerPlace" type="text" class="inputtext validate-char" value="${individualOwnerBase.registerPlace}" size="16"></td>
                                      <td rowspan="2" valign="top" class="aux_intable_td1">兴趣爱好：</td>
                                      <td rowspan="2" class="aux_intable_td2"><table border="0" cellspacing="0" cellpadding="0">
                                          <tr>
                                            <td>
                                            	<pms:unitedSelect id="unSelectInterest"
                                            						name="unSelectInterest"
                                            						dataList="${interestList}"
                                            						optionLabel="name"
                                            						optionValue="interestId"
                                            						multiple="multiple"
                                            						size="3"
                                            						ondblclick="interestObj.moveToRight()"
                                            						style="width:100px;height:60px;color:#000000;border: 1px solid #9299A3;padding-top: 3px;"
                                            						>
                                            	</pms:unitedSelect>
                                          </td>
                                            <td><table border="0" cellspacing="0" cellpadding="0">
                                                <tr>
                                                  <td width="4" style="width:4px;"></td>
                                                  <td width="4" class="between_space_both"></td>
                                                  <td>

			                                           <pms:unitedSelect id="selectedInterest"
			                                           					name="selectInterestList"
			                                           					dataList="${selectInterestList}"
			                                           					optionLabel="name"
			                                           					optionValue="interestId"
			                                           					multiple="multiple"
			                                           					size="3"
			                                           					ondblclick="interestObj.moveToLeft();"
			                                           					style="width:100px;height:60px;color:#000000;border: 1px solid #9299A3;padding-top: 3px;"
			                                           					>
			                                           </pms:unitedSelect>
                                                  </td>
                                                </tr>
                                            </table></td>
                                          </tr>
                                      </table></td>
                                    </tr>
                                    <tr>
                                      <td class="aux_intable_td1">职业：</td>
                                      <td valign="top" class="aux_intable_td2"><input name="profession" type="text" class="inputtext validate-char" maxlength="30" value="${individualOwnerBase.profession}" size="16"></td>
                                    </tr>
                                    <tr>
                                      <td class="aux_intable_td1">单位名称：</td>
                                      <td class="aux_intable_td2"><input name="corporation" type="text" class="inputtext validate-char" maxlength="100" value="${individualOwnerBase.corporation}" size="16"></td>
                                      <td rowspan="2" valign="top" class="aux_intable_td1">备注：</td>
                                      <td rowspan="2" valign="top" class="aux_intable_td2"><textarea name="remark" cols="29" rows="2" class="textareatext max-length-1000">${individualOwnerBase.remark}</textarea></td>
                                    </tr>
                                    <tr>
                                      <td valign="top" class="aux_intable_td1">联系地址：</td>
                                      <td valign="top" class="aux_intable_td2"><input name="linkAddress" maxlength="255" type="text" class="inputtext validate-char" value="${individualOwnerBase.linkAddress}" size="16"></td>
                                    </tr>
                                  </table>
							</form>
                        </td>
                      </tr>

                </table>
            </div>
            </div>
		  </td>
      </tr>
    </table>
	</td>
  </tr>
  <c:if test="${editFlag ne 'editFlag'}">
  <tr>
    <td class="window_footer"><table border="0" cellpadding="0" cellspacing="0">
        <tr>
          <td>&nbsp;</td>
          <td class="btn_between_space"></td>
          <td><table border="0" cellpadding="0" cellspacing="0">
            <tr>
              <td class="buttonOffLeft" id="btn1_21"></td>
              <td class="buttonOffMiddle"
                  id="btn1_22"
              	  onClick="submitForm();"
              	  onMouseOver="btn_change_over(2)"
              	  onMouseOut="btn_change_out(2)"
              	  onblur="btn_change(2)">
              	<img src="${ctx}/images/ico_ok.gif" alt="" width="14" height="14" border="0" align="absbottom"> 保 存</td>
              <td class="buttonOffRight" id="btn1_23"></td>
            </tr>
          </table></td>
          <td class="btn_between_space"></td>
        <td><table border="0" cellpadding="0" cellspacing="0" onClick="windowClose();">
            <tr>
              <td class="buttonOffLeft" id="btn1_31"></td>
              <td class="buttonOffMiddle" id="btn1_32" onblur="btn_change(3)" onMouseOver="btn_change_over(3)" onMouseOut="btn_change_out(3)"><img src="${ctx}/images/ico_cancel.gif" border="0" align="absmiddle" /> 关 闭</td>
              <td class="buttonOffRight" id="btn1_33"></td>
            </tr>
        </table></td>
      </tr>
    </table></td>
  </tr>
  </c:if>
</table>

<script type="text/javascript">
              Calendar.setup(
              {
	              inputField : "birthDate", // ID of the input field
	              ifFormat : "%Y-%m-%d", // the date format
	              button : "imgBirthDate", // ID of the button
	              align          :    "Tl",           // alignment (defaults to "Bl")
			      singleClick    :    true
              }
              );

</script>
</body>
</html>